home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / internet / net commander 1.0 / ISP / SCRPTLST / MAINELNK.CMD < prev    next >
Encoding:
Text File  |  1996-02-16  |  2.8 KB  |  112 lines

  1. # MAINELINK TRUMPET LOGIN.CMD DIALING SCRIPT
  2. #
  3. #if ![load $method]
  4.    query $method "Select (S)lip or (P)PP mode."
  5. #  ****  convert case
  6.    $method = upper ($method)
  7. #      save $method
  8. #   end
  9. #end
  10. if ![load $username]
  11.   if [username "Enter your login username"]
  12.     save $username
  13.   end
  14. end
  15. #if ![load $password]
  16.   if [password "Enter your login password"]
  17. #    save $password
  18.   end
  19. #end
  20. # ***  Prompt for dialing prefix to either dial 9 or disable callwaiting.
  21. #if ![load $number]
  22.    query $prefix "Enter dialing prefix. (*70 or 9)"
  23. #      save $number
  24. #   end
  25. #end
  26. #  ***  If no number, prompt for it and save it.
  27. if ![load $number]
  28.    query $number "Enter telephone number"
  29.    save $number
  30. end
  31. # ***  Make sure saved number has a value
  32. if $number = ""
  33.    query $number "Enter telephone number"
  34.    save $number
  35. end
  36. $modemsetup = "z"
  37. $prompt = ">"
  38. $userprompt = "login:"
  39. $passprompt = "Password:"
  40. #$addrtarg = "Your address is"
  41. $addrtarg = "to"
  42. %attempts = 10
  43. #
  44. #----------------------------------------------------------
  45. #
  46. # initialize modem
  47. #
  48. #----------------------------------------------------------
  49. output "atz"\13
  50. if ! [input 10 OK\n]
  51.   display "Modem is not responding"\n
  52.   abort
  53. end
  54. #----------------------------------------------------------
  55. #
  56. # modem setup commands
  57. #
  58. #----------------------------------------------------------
  59. output "at"$modemsetup\13
  60. input 10 OK\n
  61. #----------------------------------------------------------
  62. #
  63. # *** send phone number including prefix
  64. #
  65. #----------------------------------------------------------
  66. %n = 0
  67. repeat
  68.   if %n = %attempts
  69.     display "Too many dial attempts"\n
  70.     abort
  71.   end
  72.   output "atdt"$prefix","$number\13
  73.   %ok = [input 60 CONNECT]
  74.   %n = %n + 1
  75. until %ok
  76. input 10 \n
  77. #----------------------------------------------------------
  78. #
  79. #  wait till it's safe to send because some modem's hang up
  80. #  if you transmit during the connection phase
  81. #
  82. #----------------------------------------------------------
  83. wait 30 dcd
  84. #----------------------------------------------------------
  85. #
  86. # now prod the terminal server
  87. #
  88. #----------------------------------------------------------
  89. output \13
  90. #----------------------------------------------------------
  91. #
  92. #  wait for the username prompt  
  93. #  ***  Also outputs the method of login!
  94. #
  95. #----------------------------------------------------------
  96. input 30 $userprompt
  97. output $method$username\13
  98. #----------------------------------------------------------
  99. #
  100. # and the password
  101. #
  102. #----------------------------------------------------------
  103. input 30 $passprompt
  104. output $password\13
  105. #----------------------------------------------------------
  106. #
  107. # we are now logged in
  108. #
  109. #----------------------------------------------------------
  110. input 30 $addrtarg
  111. address 30
  112. display \nConnected.  Your IP address is \i.\n